import React, { Component } from 'react';
import {
  BrowserRouter as Router,
  Route,
  Link,
} from 'react-router-dom';

import Home from './routes/Home';
import Example from './examples';

class App extends Component {
  render() {
    return (
      <Router>
        <div>
          <ul>
            <li>
              <Link to={'/'}>首页</Link>
            </li>
            <li>
            <Link to={'/example'}>示例页</Link>
            </li>
          </ul>
          <Route exact path={'/'} component={Home} />
          <Route exact path={'/example'} component={Example} />
        </div>
      </Router>
    );
  }
}

export default App;
